<?php

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use app\modules\Member\models\Member;
use dektrium\user\models\User;
use kartik\select2\Select2;
use yii\web\JsExpression;




?>

<div class="product-form">
    <?php $form = ActiveForm::begin([
                 'options' => ['enctype' => 'multipart/form-data',],
                 'layout' => 'horizontal',
                 'fieldConfig' => [
                    'template' => "{label}\n{beginWrapper}\n{input}\n{hint}\n{error}\n{endWrapper}",
                    'horizontalCssClasses' => [
                        'label' => 'col-sm-2',
                        'wrapper' => 'col-sm-7',
                        'error' => '',
                    ],
                 ],
            ]); ?>

    <?= $form->field($model, 'product_id')->label(false)->hiddenInput() ?>

    <?php echo $form->field($model, 'room_id')->widget(Select2::classname(), [
                'data' =>$room,
                'language' => 'zh-cn',
                'options' => ['placeholder' => '选择房间类型'],
                'pluginOptions' => [
                    'allowClear' => true
                ],
            ])->label('房间类型') ?>
            
    <?= $form->field($model, 'people')->textInput(['maxlength' => 18])->label('人数') ?>

   	<hr>
    <div class="form-group text-center">
        <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>
</div>